﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace DiemTichLuy.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            List<DiemTichLuyModels.Object.SanPham> sps = new List<DiemTichLuyModels.Object.SanPham>();
            sps.Add(new DiemTichLuyModels.Object.SanPham() { ID=1,Name="product 1"});
            sps.Add(new DiemTichLuyModels.Object.SanPham() { ID = 2, Name = "product 2" });
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
            return View(sps);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }
        public ActionResult ListLoai()
        {
            List<DiemTichLuyModels.Object.LoaiSanPham> loais = new List<DiemTichLuyModels.Object.LoaiSanPham>();
            loais.Add(new DiemTichLuyModels.Object.LoaiSanPham() { ID=1,TenLoai="loai1"});
            loais.Add(new DiemTichLuyModels.Object.LoaiSanPham() { ID = 2, TenLoai = "loai2" });
            return PartialView(loais);
        }
        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
